<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Reporter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Reporter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/rspec/lib/spec/runner/reporter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/reporter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000212">add_behaviour</a>&nbsp;&nbsp;
      <a href="#M000217">dump</a>&nbsp;&nbsp;
      <a href="#M000216">end</a>&nbsp;&nbsp;
      <a href="#M000214">example_finished</a>&nbsp;&nbsp;
      <a href="#M000213">example_started</a>&nbsp;&nbsp;
      <a href="#M000211">new</a>&nbsp;&nbsp;
      <a href="#M000215">start</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Class <a href="Reporter/Failure.html" class="link">Spec::Runner::Reporter::Failure</a><br />

    </div>




      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000211" class="method-detail">
        <a name="M000211"></a>

        <div class="method-heading">
          <a href="#M000211" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(formatters, backtrace_tweaker)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000211-source">
<pre>
   <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 5</span>
5:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">formatters</span>, <span class="ruby-identifier">backtrace_tweaker</span>)
6:         <span class="ruby-ivar">@formatters</span> = <span class="ruby-identifier">formatters</span>
7:         <span class="ruby-ivar">@backtrace_tweaker</span> = <span class="ruby-identifier">backtrace_tweaker</span>
8:         <span class="ruby-identifier">clear!</span>
9:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000212" class="method-detail">
        <a name="M000212"></a>

        <div class="method-heading">
          <a href="#M000212" class="method-signature">
          <span class="method-name">add_behaviour</span><span class="method-args">(name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000212-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 11</span>
11:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_behaviour</span>(<span class="ruby-identifier">name</span>)
12:         <span class="ruby-ivar">@formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">add_behaviour</span>(<span class="ruby-identifier">name</span>)}
13:         <span class="ruby-ivar">@behaviour_names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">name</span>
14:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000217" class="method-detail">
        <a name="M000217"></a>

        <div class="method-heading">
          <a href="#M000217" class="method-signature">
          <span class="method-name">dump</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Dumps the summary and returns the total number of failures
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000217-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 45</span>
45:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
46:         <span class="ruby-ivar">@formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">start_dump</span>}
47:         <span class="ruby-identifier">dump_failures</span>
48:         <span class="ruby-ivar">@formatters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> 
49:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-ivar">@example_names</span>.<span class="ruby-identifier">length</span>, <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">length</span>, <span class="ruby-ivar">@pending_count</span>)
50:           <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
51:         <span class="ruby-keyword kw">end</span>
52:         <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">length</span>
53:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000216" class="method-detail">
        <a name="M000216"></a>

        <div class="method-heading">
          <a href="#M000216" class="method-signature">
          <span class="method-name">end</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000216-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 40</span>
40:       <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">end</span>
41:         <span class="ruby-ivar">@end_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
42:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000214" class="method-detail">
        <a name="M000214"></a>

        <div class="method-heading">
          <a href="#M000214" class="method-signature">
          <span class="method-name">example_finished</span><span class="method-args">(name, error=nil, failure_location=nil, not_implemented = false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000214-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000214-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 20</span>
20:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_finished</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">error</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">failure_location</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">not_implemented</span> = <span class="ruby-keyword kw">false</span>)
21:         <span class="ruby-ivar">@example_names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">name</span>
22:         
23:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">not_implemented</span>
24:           <span class="ruby-identifier">example_pending</span>(<span class="ruby-ivar">@behaviour_names</span>.<span class="ruby-identifier">last</span>, <span class="ruby-identifier">name</span>)
25:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">error</span>.<span class="ruby-identifier">nil?</span>
26:           <span class="ruby-identifier">example_passed</span>(<span class="ruby-identifier">name</span>)
27:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">DSL</span><span class="ruby-operator">::</span><span class="ruby-constant">ExamplePendingError</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">error</span>
28:           <span class="ruby-identifier">example_pending</span>(<span class="ruby-ivar">@behaviour_names</span>.<span class="ruby-identifier">last</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">error</span>.<span class="ruby-identifier">message</span>)
29:         <span class="ruby-keyword kw">else</span>
30:           <span class="ruby-identifier">example_failed</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">error</span>, <span class="ruby-identifier">failure_location</span>)
31:         <span class="ruby-keyword kw">end</span>
32:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000213" class="method-detail">
        <a name="M000213"></a>

        <div class="method-heading">
          <a href="#M000213" class="method-signature">
          <span class="method-name">example_started</span><span class="method-args">(name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000213-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 16</span>
16:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">name</span>)
17:         <span class="ruby-ivar">@formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">name</span>)}
18:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000215" class="method-detail">
        <a name="M000215"></a>

        <div class="method-heading">
          <a href="#M000215" class="method-signature">
          <span class="method-name">start</span><span class="method-args">(number_of_examples)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000215-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/reporter.rb, line 34</span>
34:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">number_of_examples</span>)
35:         <span class="ruby-identifier">clear!</span>
36:         <span class="ruby-ivar">@start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
37:         <span class="ruby-ivar">@formatters</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">number_of_examples</span>)}
38:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>